﻿using System;
using System.Data;
using System.Data.Common;
using Hxj.Data;
using Hxj.Data.Common;

namespace RecruitStudents.Utility.Model
{
    /// <summary>
    /// 实体类TB_Dic_PadShowFiledAll 。(属性说明自动提取数据库字段的描述信息)
    /// </summary>
    [Serializable]
    public class TB_Dic_PadFiledAll : Entity
    {
        public TB_Dic_PadFiledAll() : base("TB_Dic_PadFiledAll") { }

        #region Model
        private string _DicNO;
        private string _DicName;
        private string _IsActive;
        /// <summary>
        /// 字典编码
        /// </summary>
        public string DicNO
        {
            get { return _DicNO; }
            set
            {
                this.OnPropertyValueChange(_.DicNO, _DicNO, value);
                this._DicNO = value;
            }
        }
        /// <summary>
        /// 字典名称
        /// </summary>
        public string DicName
        {
            get { return _DicName; }
            set
            {
                this.OnPropertyValueChange(_.DicName, _DicName, value);
                this._DicName = value;
            }
        }
        /// <summary>
        /// 是否有效（1：开启   0：关闭）
        /// </summary>
        public string IsActive
        {
            get { return _IsActive; }
            set
            {
                this.OnPropertyValueChange(_.IsActive, _IsActive, value);
                this._IsActive = value;
            }
        }
        #endregion

        #region Method
        /// <summary>
        /// 获取实体中的主键列
        /// </summary>
        public override Field[] GetPrimaryKeyFields()
        {
            return new Field[] {
				_.DicNO};
        }
        /// <summary>
        /// 获取列信息
        /// </summary>
        public override Field[] GetFields()
        {
            return new Field[] {
				_.DicNO,
				_.DicName,
				_.IsActive};
        }
        /// <summary>
        /// 获取值信息
        /// </summary>
        public override object[] GetValues()
        {
            return new object[] {
				this._DicNO,
				this._DicName,
				this._IsActive};
        }
        /// <summary>
        /// 给当前实体赋值
        /// </summary>
        public override void SetPropertyValues(IDataReader reader)
        {
            this._DicNO = DataUtils.ConvertValue<string>(reader["DicNO"]);
            this._DicName = DataUtils.ConvertValue<string>(reader["DicName"]);
            this._IsActive = DataUtils.ConvertValue<string>(reader["IsActive"]);
        }
        /// <summary>
        /// 给当前实体赋值
        /// </summary>
        public override void SetPropertyValues(DataRow row)
        {
            this._DicNO = DataUtils.ConvertValue<string>(row["DicNO"]);
            this._DicName = DataUtils.ConvertValue<string>(row["DicName"]);
            this._IsActive = DataUtils.ConvertValue<string>(row["IsActive"]);
        }
        #endregion

        #region _Field
        /// <summary>
        /// 字段信息
        /// </summary>
        public class _
        {
            /// <summary>
            /// * 
            /// </summary>
            public readonly static Field All = new Field("*", "TB_Dic_PadShowFiledAll");
            /// <summary>
            /// 字典编码
            /// </summary>
            public readonly static Field DicNO = new Field("DicNO", "TB_Dic_PadShowFiledAll", "字典编码");
            /// <summary>
            /// 字典名称
            /// </summary>
            public readonly static Field DicName = new Field("DicName", "TB_Dic_PadShowFiledAll", "字典名称");
            /// <summary>
            /// 是否有效（1：开启   0：关闭）
            /// </summary>
            public readonly static Field IsActive = new Field("IsActive", "TB_Dic_PadShowFiledAll", "是否有效（1：开启   0：关闭）");
        }
        #endregion


    }
}

